import { Layout } from 'antd';
import Logo from 'assets/layout/logo.png';
import home from 'assets/layout/homeIcon.png';
import Sider from 'components/layouts/sider';
import { history } from 'umi';
import './index.less';

const { Header } = Layout;

function HeaderComp() {
  return (
    <div>
      <Header className="header">
        <div className="logo">
          <img src={Logo} alt="" />
          <span>国科前端 - 技术站</span>
        </div>
        <Sider />
        <div
          onClick={() => history.push('/')}
          style={{
            marginRight: '20px',
            cursor: 'pointer',
          }}>
          <img src={home} alt="" className="home" />
          首页
        </div>
        <div>
          <img
            src={
              'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1578487005306&di=e06d301cfc70f8dd06f2183d69e115b8&imgtype=0&src=http%3A%2F%2Fww2.sinaimg.cn%2Fbmiddle%2F851bbdecjw1e34j0y7xgyg.gif'
            }
            alt="/"
            className="userImg"
          />
          <span>您好，陌生人</span>
        </div>
      </Header>
    </div>
  );
}

export default HeaderComp;
